<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page import="com.db.conn"%>
<%@ page import="java.sql.*"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
<jsp:include flush="true" page="${basePath}/admin/head.jsp"></jsp:include>


<script src="<%=path %>/My97DatePicker/WdatePicker.js" type="text/javascript"></script>

 </head>

 
 <body>

 <div class="card">
        <ul class="nav nav-tabs page-tabs">
            <li class="active"><a>编辑订单信息</a></li>
        </ul>
        <div class="tab-content" style="min-height: 450px;">

		<form  action="<%=path %>/orders_Edit" method="post">
            <table style="width: 100%;" >
                   <% 			conn cn=new conn();
    
     			String id = request.getParameter("id");
				String sql = "select * from orders where no='" + id +"' ";
				ResultSet rs = cn.query(sql);
				rs.next();
			%>
<tr>
<td  style=" text-align:right; width:20%;"><font style='color:red'>*&nbsp;</font>订单编号:</td>
<td class="tbright"><div style="display:inline;float:left;">
<input name="txt_no" type="text" id="txt_no" style="width: 200px; " required  value='<%= rs.getString("no") %>' /></div>
</div> 
 </td></tr>

<tr>
<td  style=" text-align:right; width:20%;"><font style='color:red'>*&nbsp;</font>用户ID:</td>
<td class="tbright"><div style="display:inline;float:left;">
<input name="txt_uid" type="text" id="txt_uid" style="width: 200px; "  required  pattern="^-?[1-9]\d*$"  value='<%= rs.getString("uid") %>' /></div>
 </td></tr>

<tr>
<td  style=" text-align:right; width:20%;"><font style='color:red'>*&nbsp;</font>姓名:</td>
<td class="tbright"><div style="display:inline;float:left;">
<input name="txt_username" type="text" id="txt_username" style="width: 200px; " required  value='<%= rs.getString("username") %>' /></div>
</div> 
 </td></tr>

<tr>
<td  style=" text-align:right; width:20%;"><font style='color:red'>*&nbsp;</font>手机号码:</td>
<td class="tbright"><div style="display:inline;float:left;">
<input name="txt_phone" type="text" id="txt_phone" style="width: 200px; "  required  pattern="^(13|15|17|18)[0-9]{9}$"  value='<%= rs.getString("phone") %>' /></div>
</div> 
 </td></tr>

<tr>
<td  style=" text-align:right; width:20%;"><font style='color:red'>*&nbsp;</font>收货地址:</td>
<td class="tbright"><div style="display:inline;float:left;">
<input name="txt_address" type="text" id="txt_address" style="width: 200px; " required  value='<%= rs.getString("address") %>' /></div>
</div> 
 </td></tr>

<tr>
<td  style=" text-align:right; width:20%;">备注说明:</td>
<td class="tbright"><div style="display:inline;float:left;">
<textarea name="txt_ormemo" type="text" id="txt_ormemo" style="width: 300px; height:80px;  " ><%= rs.getString("ormemo")==null?"":rs.getString("ormemo") %></textarea></div>
 </td></tr>

<tr>
<td  style=" text-align:right; width:20%;"><font style='color:red'>*&nbsp;</font>订单金额:</td>
<td class="tbright"><div style="display:inline;float:left;">
<input name="txt_smoney" type="text" id="txt_smoney" style="width: 200px; "  required   pattern="((^[-]?([1-9]\d*))|^0)(\.\d{1,2})?$|(^[-]0\.\d{1,2}$)"  value='<%= rs.getString("smoney") %>'  /></div>
 </td></tr>

<tr>
<td  style=" text-align:right; width:20%;"><font style='color:red'>*&nbsp;</font>订单状态:</td>
<td class="tbright"><div style="display:inline;float:left;">
<input name="txt_oflag" type="text" id="txt_oflag" style="width: 200px; " required  value='<%= rs.getString("oflag") %>' /></div>
</div> 
 </td></tr>

<tr>
<td  style=" text-align:right; width:20%;"><font style='color:red'>*&nbsp;</font>标识:</td>
<td class="tbright"><div style="display:inline;float:left;">
<input name="txt_flag" type="text" id="txt_flag" style="width: 200px; "  required  pattern="^-?[1-9]\d*$"  value='<%= rs.getString("flag") %>' /></div>
 </td></tr>



                <tr>
                    <td>&nbsp;</td>
                    <td align="left">
					    <input name="id" type="hidden" id="id" value='<%= request.getParameter("id") %>'> 
                         <input type="submit" name="btnAdd" value="编 辑"   id="btnAdd"     class="btn btn-primary" />
                     <input name="btnReturn" type="button" value="返 回"   class="btn btn-danger"  onclick="location.href='<%=path %>/admin/orders/orders_Manage.jsp';"  />
                    </td>
                </tr>
            </table>
				<%
                                 if (rs != null)
                                        rs.close();
                                  if (cn != null)
                                        	cn.close();
                          	%>
		 </form>
         

        </div>
    </div>


</body>
</html>


